import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import path from 'path'
module.exports = {
  proxy: {
    '/api': {
      target: 'http://localhost:3000/',
      changeOrigin: true,
      rewrite: (path) => path.replace(/^\/api/, ''),
    },
  },
  optimizeDeps: {
    include: ['axios'],
  },
  alias: {
    '/@/': path.resolve(__dirname, './src'),
    '/utils/': path.resolve(__dirname, './src/utils'),
  },
  plugins: [vue(), vueJsx()],
}
